package zeebe.gateway.Exclusive;

import io.vertx.core.json.JsonObject;
import io.zeebe.client.ZeebeClient;

public class ExclusiveGatewayStart {
    public static void main(String[] args) {
        ZeebeClient client = ZeebeClient.newClientBuilder()
                .brokerContactPoint("localhost:26500")
                .usePlaintext()
                .build();

        System.out.println("启动工作流");
        String processId = "exclusiveGateway";
        JsonObject input=new JsonObject()
                .put("data", 15);

        client.newCreateInstanceCommand()
                .bpmnProcessId(processId)
                .latestVersion()
                .variables(input.encode())
                .send()
                .join();
    }
}
